package huanzhao.erp.domain.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serial;
import java.io.Serializable;
import java.util.Date;

@TableName(value = "stock")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Stock implements Serializable {

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 入库时间
     */
    @TableField(value = "time")
    private Date time;


    @TableField(value = "phone_id")
    private Long phoneId;

    /**
     * 存放区域
     */
    @TableField(value = "storage_area")
    private String storageArea;

    /**
     * 库位号
     */
    @TableField(value = "warehouse_number")
    private String warehouseNumber;

    @Serial
    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    public Stock(Long phoneId, String storageArea, String warehouseNumber) {
        this.phoneId = phoneId;
        this.storageArea = storageArea;
        this.warehouseNumber = warehouseNumber;
    }
}